import { BrowserWindow } from 'electron'
import { Controller, Inject, IpcHandle,  IpcOn, Window, BaseController  } from '@support/index'
import { ChatService } from './chat.service'
// @LINKS: chatgpt => 控制器
@Controller()
export class ChatController extends BaseController {
  constructor(
    private chatService: ChatService
  ) { 
    super()
    // console.log('SystemController', arguments )
  }
  
  @IpcOn('chat-send-message')
  sendChatMessage( p : any, e: any ){
    return this.chatService.chatSendMessage( p, e )
  }

  @IpcHandle('get-chat-message-list')
  getChatMessageList( id: number | string, param: object = {}) {
    return this.chatService.chatMessageList(id, param)
  }
}